; (function ($) {
    $.fn.select = function (options) {
        var defaults = {
            // 判断是否要三角
            trian: true,
            selectId: '#select',
            selectColor: 'black',
            selectSize: "16px",
            selectLeft: "5px",
        };
        var options = $.extend(defaults, options);
        var data = [1, 2, 3, 4, 5];
        var _this = $(this);
        _this.css({
            "overflow": "hidden",
            "position": "relative",
            "display": "block",
        });

        // 是否存在对象
        if (options.trian) {
            _this.prepend('<div class="select-triangle"></div>');
            $('.select-triangle').css({
                "position": "absolute",
                "z-index": "1",
                "top": "50%",
                "right": "10px",
                "margin-top": "-3.5px",
                "display": "block",
                "width": 0,
                "height": 0,
                "border-style": "solid",
                "border-width": "10px",
                "border-color": "#535353 transparent transparent transparent"
            });
        }
        _this.find(options.selectId).css({
            "display": "block",
            "width": "100%",
            "height": "100%",
            "overflow": "hidden",
            "background": "none",
            "border": "0px",
            /*隐藏自带小三角*/
            "-webkit-appearance": "none",
            "-moz-appearance": "none",
            "position": "relative",
            "z-index": 3,
        });
        // js 传递参数
        if (options.selectColor != 'black') {
            _this.find(options.selectId).css({
                "color": options.selectColor
            });
        }
        if (options.selectSize != '16px') {
            _this.find(options.selectId).css({
                "font-size": options.selectSize,
            });
        }
        if (_this.find(options.selectId).css("paddingLeft") == '0px') {
            _this.find(options.selectId).css({
                "padding-left": options.selectLeft
            });
        }
        // css 传递设置
        if (_this.find(options.selectId).css("color") == 'rgb(0, 0, 0)') {
            _this.find(options.selectId).css({
                "color": options.selectColor
            });
        }
        if (_this.find(options.selectId).css("fontSize") == '13.3333px') {
            _this.find(options.selectId).css({
                "font-size": options.selectSize,
            });
        }
        if (_this.find(options.selectId).css("paddingLeft") == '0px') {
            _this.find(options.selectId).css({
                "padding-left": options.selectLeft
            });
        }
    }
})(jQuery);